#!/bin/bash

set -ex # echo all commands
exec > >(tee -a data/run.log) 2>&1 # write output to log file

source "venv/bin/activate"

python -m spacy download en_core_web_sm
pip install https://github.com/medianeuroscience/emfdscore/archive/master.zip

# all 3 work
Rscript scripts/1_get_data.R
Rscript scripts/2b_mfd_original_lang.R

python scripts/2a_mfd.py # works 
python scripts/2c_ddr.py # works
python scripts/2d_ccr.py # works
python scripts/2e_moralbert.py # works

python scripts/3_run_analysis.py

mkdir -p graphs/main_article/

Rscript scripts/4a_regression.R
Rscript scripts/4b_main_figures_tables.R
Rscript scripts/4c_cmp_codes.R

python scripts/5_appendix.py
